﻿using System.Runtime.Serialization;
using LiSA_Server.Base.NHibernate.Models;
using NHibernate;
using NHibernate.Mapping.ByCode.Conformist;

namespace LiSA_Service.Users.Models
{
    [DataContract]
    public class Organization : Entity
    {
        /// <summary>
        /// Gets or sets the Name
        /// </summary>

        [DataMember]
        public virtual string Name { get; set; }

        /// <summary>
        /// Gets or sets the country in which the university is located
        /// </summary>

        [DataMember]
        public virtual string Country { get; set; }
    }

    /// <summary>
    /// The University mapping.
    /// </summary>
    public class UniversityMapping : ClassMapping<Organization>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="UserMapping"/> class.
        /// </summary>
        public UniversityMapping()
        {
            this.Property(x => x.Name, x => x.Type(NHibernateUtil.StringClob));
            this.Property(x => x.Country, x => x.Type(NHibernateUtil.StringClob));
        }
    }
}